package ahblue.cn.tanzi.model.home;

import java.util.ArrayList;

import ahblue.cn.tanzi.R;

public final class HomeModel {

    public int id;
    public String category_title;

    public HomeModel() {
    }

    public HomeModel(int id, String category_title) {
        this.id = id;
        this.category_title = category_title;
    }

    public int getIconResId() {
        if ("引流技术".equals(category_title)) {
            return R.drawable.home_tab_article;
        } else if ("软件开发".equals(category_title)) {
            return R.drawable.home_tab_course;
        } else if ("贷款口子".equals(category_title)) {
            return R.drawable.home_tab_special;
        } else if ("直销板块".equals(category_title)) {
            return R.drawable.home_tab_deal;
        } else if ("网赚".equals(category_title)) {
            return R.drawable.home_tab_mall;
        } else if ("区块链".equals(category_title)) {
            return R.drawable.home_tab_coin;
        } else {
            return R.drawable.home_tab_article;
        }
    }

    public static ArrayList<HomeModel> createDefaultModel() {
        ArrayList<HomeModel> data = new ArrayList<>();
        data.add(new HomeModel(1, "引流技术"));
        data.add(new HomeModel(2, "软件开发"));
        data.add(new HomeModel(3, "贷款口子"));
        data.add(new HomeModel(4, "直销板块"));
        data.add(new HomeModel(5, "网赚"));
        data.add(new HomeModel(6, "区块链"));
        return data;
    }

}
